#include <sys/ipc.h>
#include <sys/shm.h>
#include <iostream>
#include <unistd.h>
#include <errno.h>
#include<string.h>
using std::cerr;
using std::endl;
using std::cout;
#define IPC_PATH "/home/ys/os-learning-code/oscall/IPC"
#define PROJ_ID 0x66
#define MEM_SIZE 4096
key_t CreateKey()
{
    key_t key = ftok(IPC_PATH, PROJ_ID);
    if (key == -1)
    {
        cerr << "ftok create key error" << endl;
        exit(1);
    }
    return key;
}